﻿using System.Transactions;

partial class SkiWorldDataContext
{
    private static SkiWorldDataContext _instance = null;

    public static void InitializeInstance(string path)
    {
        if (null == _instance)
        {
            _instance = new SkiWorldDataContext(path);

            try
            {
                if (!_instance.DatabaseExists())
                {
                    _instance.CreateDatabase();
                    _instance.InitDataBase();
                }
            }
            catch
            {
            }
        }
    }

    public static SkiWorldDataContext GetInstance()
    {
        return _instance;
    }

    private void InitDataBase()
    {

    }
}
